//
//  UserInfoManager.m
//  LoginAndRegistDemo
//
//  Created by lanou3g on 16/4/25.
//  Copyright © 2016年 wangzhen. All rights reserved.
//

#import "UserInfoManager.h"

@implementation UserInfoManager
+(instancetype)shareManager{
    static UserInfoManager *manager = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        if (!manager) {
            manager = [UserInfoManager new];
        }
    });
    return manager;
}

-(void)loginWithUserDcit:(NSDictionary *)dict{
    if (dict) {
        [self setValuesForKeysWithDictionary:dict];
    }
}

-(void)setValue:(id)value forKey:(NSString *)key{
    [super setValue:value forKey:key];
    //存储到本地
    [[NSUserDefaults standardUserDefaults]setValue:@"占位图.png" forKey:@"头像"];
    [[NSUserDefaults standardUserDefaults]setValue:value forKey:key];
    [[NSUserDefaults standardUserDefaults] synchronize];
}


@end
